package com.game.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: tjc
 * @description
 * @Date Created in 18:41 2020/8/22
 */
public class ApplicationUtil {
    private ApplicationContext context;
    public ApplicationUtil(String sourcePath) {
        context = new ClassPathXmlApplicationContext(sourcePath);
    }
    public Object getBean(String beanName) {
        return context.getBean(beanName);
    }


}
